Data Model

 Topic Outline

Data Model

Parts of a Data Model

Types of Data Models

  • Object-Based Data Models
  • Record Based Data Models


Data Models

Model

Model is a representation of the real-world objects, events, and associations between them. It helps the user to understand the complexities of the real world.

Data Model

A data model is a collection of concepts to describe and manipulate data, the relationship between data, and constraints on data. A data model gives us an idea of what the final system will look like after completing its implementation. It is used to show how data is stored, accessed, and updated in the DBMS. 

Parts of a Data Model
A data model consists of three parts:

Structural Part

The structural part consists of a set of rules. It tells how the database can be developed.

Manipulative Part

The manipulative part defines the types of operations that can be performed on the data.

Set of Integrity Rules

The set of integrity rules ensures the accuracy of data in the database.
Types of Data Models

Three types of data models are as follows:

1: Object-Based Data Models
2: Record-Based Data Models

The object-based and record-based models describe data at a conceptual level and external level. The physical data model describes data at an internal level. 

1: Object-Based Data Model

Object-based data models use entities, attributes, and relationships. An entity is a person. place, thing, or event for which data is collected in the database. The attribute is the characteristics of an entity. The relationship is an association between entities.

  

2: Record Based Data Model

Record based data model is used to describe the external and conceptual level of the database and also the internal level to some extent. In this data model, the database consists of different records. 

Types of Record Based Data Model

  • Hierarchical Model
  • Network Model
  • Relational Model

  • Hierarchical Model 

The earliest DBMS was based on the hierarchical model. The hierarchical model has a parent-child relationship. The popular hierarchical database management system was Information Management System. 

It arranges records in a hierarchy like an organizational chart. Each record type in this model is called a node. A node represents a specific entity. The topmost node is called the root.

A higher-level node is called a parent node. A parent node can have one or many child nodes. The lower level node is called the child node. A child node can have only one parent node.


 

Characteristics of Hierarchical Model

Simple Structure

A database is a simple hierarchical tree. Parent and child record is stored close to each other.

High Performance

Parent-child relationships are stored as pointers from one record to another record.

More Complex Real Life Requirements

The hierarchical database management system is based on the parent-child relationship. Real-life applications are complex and cannot be presented by the hierarchical structure.

  • Network Model

The network model was developed to overcome the problem of the hierarchical model. In the network model, a child node can have more than one parent node. Child nodes are represented by arrows in the network model. Network model provides more flexible than the hierarchical model.

Shape 

  • Relational Model

It is the most commonly used database model. This model consists of simple relations. Relation represents a specific entity. The relation is used to store information. The relational model is more flexible than the hierarchical model and network model.

Dr. E. F. Codd worked to improve the working of the Database management system. The database management system is used for handling a large amount of data. To solve the problem of the earlier database model rules of mathematics are applied. Term relation is also derived from the set theory of mathematics.

In the relational database model, data is stored in relation. The relation is another term used for the table. Relation or table has a unique name that specifies its content. The table consists of rows and columns. Every table must have a column that specifies each row in the table.

Relation Database Terminology

Terminologies that are used in the relational database model are as follows:

(1) Relation

In a relational database, data are stored in relations (tables). 

Example

Diagram

(2) Tuple

In a relational database, every relation (table) consists of rows. Tuples are also called rows or records. This table consists of three tuples.

Diagram

(3) Attributes

It is a column name of a relation (table). Attributes are also called characteristics. Characteristics of the row are represented by fields.

Diagram

(4) Domain

It is a collection of all possible values of one or more attributes.

Example

The value in the field "Registration number" can be the name of any student. It is known as the registered domain.

(5) Degree

The number of attributes is called the degree of that relation or table. The degree of this table is four (reg no, name, class, address).

(6) Cardinality

The number of rows is called the cardinality of that relation or table. The rows in the table are 8.

Advantages

  • Data Independence

Implementation of the database will not be affected by changes made in the logical design of the database.

  • Data Integrity

It allows data integrity from field level to table level to avoid duplication of records. Integrity means the same data do not duplicate in rows or columns.








Comments

Popular Posts

Computer Abbreviation

Transport Layer

Introduction to Database

Types of database

Threads in operating system

Display devices

Shortcut keys of computer

History of Computer